<template>

    <div class="app-container">
        <levelbar></levelbar>

        <div class="form-box">
            <div class="form-title">活动详情</div>
                <el-form label-width="110px" class="app-content form">
                    <div class="form-item">
                        <div class="form-item-title">
                            <span class="title-level">活动详情</span>
                        </div>
                        <div class="form-content">
                            <div class="content">
                                <label>活动名称：</label>
                                <span class="inner-content">{{datailList.title}}</span>
                            </div>
                            <div class="content">
                                <label>备注：</label>
                                <span class="inner-content">{{datailList.desc===null? '--':datailList.desc}}</span>
                            </div>
                            <div class="content">
                                <label>上线时间：</label>
                                <span class="inner-content">{{datailList.onlineTime===null? '--':datailList.onlineTime}}</span>
                            </div>
                            
                            <div class="content">
                                <label>可见级别：</label>
                                <span class="inner-content">{{datailList.getLookStatus===null? '--':datailList.getLookStatus}}</span>
                            </div>

                            <div class="content">
                                <label>阅读数：</label>
                                <span class="inner-content">{{datailList.readNum===null? '--':datailList.readNum}}</span>
                            </div>

                            <div class="content">
                                <label>点击次数：</label>
                                <span class="inner-content">{{datailList.clickNum===null? '--':datailList.clickNum}}</span>
                            </div>
                            
                            <div class="content">
                                <label>点赞数：</label>
                                <span class="inner-content">{{datailList.admireNum===null? '--':datailList.admireNum}}</span>
                            </div>
                        </div>
                    </div>

                    <div class="form-item">
                        <div class="form-item-title">
                            <span class="title-level">活动图片（分辨率：680*220）</span>
                        </div>
                        <div class="form-content">
                            <div class="content">                 
                                <div class="imgSec">
                                    <img :src='datailList.picture'>
                                </div>  
                            </div>  
                        </div>
                    </div>
                        
                    <div class="form-item">
                        <div class="form-item-title">
                            <span class="title-level">活动链接或自定义内容</span>
                        </div>
                        <div class="form-content">
                            <!-- padding-left: 20px -->
                            <el-row style = "width: 100%">
                                <el-col>
                                    <div v-if="datailList.html === null">链接：{{datailList.htmlUrl}}</div>
                                    <div v-else class="panel-body" v-html="datailList.html"></div>
                                </el-col>
                            </el-row>
                        </div>
                    </div>

                    <div class="form-item area">
                        <div class="form-item-title">
                            <span class="title-level">投放区域</span>
                        </div>
                        <div class="form-content">
                            <div class="content">
                                <label>省份：</label>
                                <span class="inner-content">{{datailList.provinceName===null? '--':datailList.provinceName}}</span>
                            </div>

                            <div class="content">
                                <label>城市：</label>
                                <span class="inner-content">{{datailList.cityName===null? '--':datailList.cityName}}</span>
                            </div>

                            <div class="content">
                                <label>区县：</label>
                                <span class="inner-content">{{datailList.areaName===null? '--':datailList.areaName}}</span>
                            </div>

                           
                        </div>
                    </div>
                    
                    <div class="form-item">
                        <el-form-item class="footer">
                            <el-button @click="gobackList">返回</el-button>
                        </el-form-item>
                    </div>
                
            </el-form>
        </div>
        
    </div>
</template>

<script>
import { getDetail } from 'api/activityManagement';
import Levelbar from '../../layout/Levelbar';
import { mapGetters } from 'vuex';
import province from 'components/CascadeRegion/province';
import city from 'components/CascadeRegion/city';
import region from 'components/CascadeRegion/region';
export default{
    name: 'activityDetail',
    components: {Levelbar, province, city, region},
    data() {
        return {
            datailList: []// 回填数据

        }
    },
    created() {
        let id = this.$route.params.id; 
        getDetail(id).then(response => {
            if (response.data.status == 200) {
                this.datailList = response.data.content;
                console.log('fdsfas')
            }
        });
    },
    computed: {
        ...mapGetters([
            'uid'
        ])
    },
    methods: {
    // 跳转
        gobackList() {
            this.$router.push({
                path: '/activityManagement'
            });
        }
    }
}
</script>

<style lang="scss" scoped>
 @import "../../../../static/tinymce/skins/lightgray/content.min.css";
.app-container {
    position: relative;
    padding: 20px 20px 10px;
    $bgcolor: #fff;

    @mixin showTitle() {
        background: $bgcolor;
        box-shadow:  0px 0px 5px 0px rgba(0, 0, 0, 0.1);
        -webkit-box-shadow:  0px 0px 5px 0px rgba(0, 0, 0, 0.1);
    }
    .form-box {
        padding: 0 50px;
        @include showTitle();
        .form-title {
        padding-top:8px;
        text-align: center;
        font-size: 18px;
        color: #333;
        line-height: 72px;
        font-weight: bold;
        font-family: Microsoft YaHei;
        border-bottom: 1px solid #ddd;
        }
        .form {
        .form-item {
            padding-bottom: 40px;
            overflow: hidden;
            &.area{
                .content{
                    width: 100%;
                }
            }
            .form-item-title {
                margin: 40px 0;
                font-size: 14px;
                color: #333;
                line-height: 14px;
                border-left: 4px solid #ff5e2c;
                text-indent: 16px;
            
            .note-css {
                vertical-align: middle;
                display: inline-block;
                width: 4px;
                height: 14px;
                margin-right: 26px;
                border-left: 3px solid #ff5e2c;
            }
            }
            .content{
                float: left;
                width: 50%;
                padding-bottom: 20px;
                font-size: 14px;
                color: #666;
                label{
                    display: inline-block;
                    width: 100px;
                    padding-right: 20px;
                    text-align: right;
                }
                .inner-content{
                    font-size: 14px;
                    color: #333;
                }
            }
            .subjectKuang{
                padding:5px 5px 40px 5px;
                width:470px;
            }
            .el-tag{
                margin-left:10px;
                background:#f9f9f9;
                color:#444;
            }
            .footer {
            //float: right;
            text-align: center;
            margin-top: 40px;
            }
        }
        }
    }
    .app-levelbar {
        height: 35px;
    }
    .el-form{
        // padding-Top: 30px;
        background:#fff;
        // padding-bottom:170px;       
        .appTop{
            padding:0 0 40px 0px;
            position:relative;
            margin-left:-10px;
            font-size: 14px;
            color: #333;
        }
        .appTop p{
            margin-left:15px;
        }
        .el-form-item{
            margin-top:8px;
            margin-bottom: 0;
        }
        .appTop:before {
            content: '';           
            float: left;
            border-radius: 2px;
            width:4px;
            height:16px;
            background:#ff5e2c;
            margin-top:2px;
        }
        .content-wrapper{
            padding-bottom: 70px;
            overflow: hidden;
            .content{
                float: left;
                width: 50%;
                padding-bottom: 30px;
                font-size: 14px;
                color: #666;
                label{
                    display: inline-block;
                    width: 100px;
                    padding-right: 40px;
                }
                .inner-content{
                    font-size: 14px;
                    color: #333;
                }
            }
            
        }
        .mytable table thead{
            background: #F7F7F7;
        }
        .addContinue{
            margin-left:60px;
            margin-top:20px
        }
        .appTitle{
            padding:0px 0 30px 50px;
            margin-bottom:30px;
            text-align:center;
            border-bottom:1px solid #ECECEC;
        }
        .box{
            padding: 0px 40px 0;
            background:#fff;
            margin-left:10px; 
        }
        .imgSec{
            padding-left: 20px;
            img{
                max-width: 1000px;
            }
        }
        .subjectKuang{
            padding:5px 5px 40px 5px;
            width:470px;
        }
        .el-tag{
            margin-left:10px;
            background:#f9f9f9;
            color:#444;
        }
        .footer {
          //float: right;
          text-align: center;
          margin-top: 60px;
        }
    }
    
}

</style>